import Vue from 'vue'
import Router from 'vue-router'

import Home from '@/components/Home'
import NewsList from '@/components/NewsList'
import About from '@/components/About'
import Sports from "@/components/Sports";
import Technology from "@/components/Technology.vue";

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: "/", // 路由地址
      name: "Home", // 路由名称
      component: Home, // 渲染的组件对象
    },
    {
      path: "/news-list",
      name: "NewsList",
      component: NewsList,
      children: [{
        path: "sports",
        name: "Sports",
        component: Sports,
      },
      {
        path: "technology",
        name: "Technology",
        component: Technology,
      }
      ]
    },
    {
      path: "/about",
      name: "About",
      component: About,
    },
  ]
})
